class Person(object):
    def __init__(self,name,weight):
        self.name = name
        self.weight = weight


    def __str__(self):
        return f"{self.name}的当前体重是{self.weight}公斤"


    def run(self):
        print(f"{self.name}在跑步")
        self.weight -= 0.5

    def eat(self):
        print(f"{self.name}在吃东西")
        self.weight += 1


xiaoming = Person("小明",75)
print(xiaoming)


xiaoming.run()
print(xiaoming)

xiaoming.eat()
print(xiaoming)









class Dog(object):
    def __init__(self,name,weight):
        self.name = name
        self.weight = weight


    def __str__(self):
        return f"{self.name}的体重是{self.weight}公斤"

    def eat(self):
        print(f"{self.name}在吃东西")
        self.weight += 1

    def run(self):
        print(f"{self.name}在跑步")
        self.weight -= 0.5

xiaobai = Dog("小白",20)
print(xiaobai)

xiaobai.eat()
print(xiaobai)

xiaobai.run()
print(xiaobai)













class Cat(object):
    def __init__(self,name,sex,weight=28):
        self.name = name
        self.sex = sex
        self.weight = weight

    def __str__(self):
        return f"{self.name}体重是{self.weight}"


    def eat(self):
        print(f"{self.name}在吃东西")
        self.weight += 0.5

xiaomi = Cat("小咪","母猫")
print(xiaomi)



xiaomi.eat()
print(xiaomi)









class Person(object):
    def __init__(self,name,weight):
        self.name = name
        self.weight = weight

    def __str__(self):
        return f"{self.name}的当前体重是{self.weight}公斤"

    def eat(self):
        print(f"{self.name}在吃东西")
        self.weight += 1

    def run(self):
        print(f"{self.name}在跑步")
        self.weight -= 0.5

xiaomei = Person("小美",45)
print(xiaomei)

xiaomei.eat()
print(xiaomei)

xiaomei.run()
print(xiaomei)










class WebProject(object):
    def __init__(self,username,password,verify_code):
        self.username = username
        self.password = password
        self.verify_code = verify_code

    def login(self):
        print(f"用户名：{self.username}，密码是：{self.password}验证码是：{self.verify_code}，正在登录中")
        print(f"密码是：{self.password}")
        print(f"验证码是：{self.verify_code}")
        print(f"正在登录中")


        # print(f"用户名：{self.username}，密码是：{self.password}验证码是：{self.verify_code}，正在登录中")

web = WebProject("admin","123456","8888")
# print(web)

web.login()
# print(web)
























